home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / appkit.619 < prev    next >
Text File  |  1992-02-06  |  879b  |  33 lines

  1. {\rtf0\ansi{\fonttbl\f2\fnil Times-Roman;\f3\fmodern Courier;\f0\fswiss Helvetica;}
  2. \paperw12740
  3. \paperh8500
  4. \margl120
  5. \margr120
  6. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f2\b0\i0\ul0\fs28 Appkit programming/Menu id\
  7. \
  8. Q:  How do I find the id of a menu?\
  9. \
  10. A:  To get the menu id of the main menu you do this:\
  11.  
  12. \f3\fs24     [NXApp mainMenu]\
  13. \
  14.  
  15. \f2\fs28 There is no direct way to find the id of other menus unless you know the menu cell  which corresponds to the menu in question.  Then you can use the ActionCell method
  16. \f3\fs24  target
  17. \f2\fs28  which will return the target of the cell, i.e. its menu id.  This method can be used to find any menu id.  It is especially useful for finding the id of a submenu.\
  18. \
  19. Example:\
  20.     
  21. \f3\fs24 myMenuId = [myMenuCell target];\
  22.     
  23. \f2\fs28 \
  24.  
  25. \f3\fs24     
  26. \f2\fs28 \
  27. QA619\
  28. \
  29. Valid for 1.0\
  30. Valid for 2.0\
  31. \
  32.  
  33.